


#this program demonstrate taking input from inputdevice


print "Enter number: "; 
$number = <>; 
chomp($number); 
if ($number-2*int($number/2) == 0)  { 
   print "$number is even\n"; 
} 
elsif (abs($number-2*int($number/2)) == 1) { 
    print "$number is odd\n"; 
} 
else { 
    print "Something strange has happened!\n"; 
} 
